/**
 * 
 */
package com.shine.icis.hbean;

import java.io.Serializable;
import java.util.Set;

import org.apache.struts2.json.annotations.JSON;

/**
 * 审批步骤
 * @author zsy
 *
 */
public class FlowNode implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -1998411859294309098L;
	private String nodeId;
	private String nodeName;//步骤名称
	private String actionHandler;//处理事件
	private int orderCode;//排序号
	
	private FlowDef flowDef;//流程定义
	private Set<NodeAssign> nodeAssigns;
	
	private Set<TaskIns> taskInses;
	private Set<FlowIns> flowInses;

	public String getNodeId() {
		return nodeId;
	}

	public void setNodeId(String nodeId) {
		this.nodeId = nodeId;
	}

	public String getNodeName() {
		return nodeName;
	}

	public void setNodeName(String nodeName) {
		this.nodeName = nodeName;
	}

	public String getActionHandler() {
		return actionHandler;
	}

	public void setActionHandler(String actionHandler) {
		this.actionHandler = actionHandler;
	}

	public int getOrderCode() {
		return orderCode;
	}

	public void setOrderCode(int orderCode) {
		this.orderCode = orderCode;
	}
	@JSON(serialize=false)
	public FlowDef getFlowDef() {
		return flowDef;
	}

	public void setFlowDef(FlowDef flowDef) {
		this.flowDef = flowDef;
	}

	public Set<NodeAssign> getNodeAssigns() {
		return nodeAssigns;
	}

	public void setNodeAssigns(Set<NodeAssign> nodeAssigns) {
		this.nodeAssigns = nodeAssigns;
	}
	@JSON(serialize=false)
	public Set<TaskIns> getTaskInses() {
		return taskInses;
	}

	public void setTaskInses(Set<TaskIns> taskInses) {
		this.taskInses = taskInses;
	}
	@JSON(serialize=false)
	public Set<FlowIns> getFlowInses() {
		return flowInses;
	}

	public void setFlowInses(Set<FlowIns> flowInses) {
		this.flowInses = flowInses;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((nodeId == null) ? 0 : nodeId.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final FlowNode other = (FlowNode) obj;
		if (nodeId == null) {
			if (other.nodeId != null)
				return false;
		} else if (!nodeId.equals(other.nodeId))
			return false;
		return true;
	}

}

